<!--
 * @Author: your name
 * @Date: 2020-11-16 20:27:47
 * @LastEditTime: 2020-11-16 20:44:23
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \H5 2010 studyd:\H5 2010 练习\第二阶段\DAY 16\拖拽(面向对象).html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            position: relative;
            width: 900px;
            height: 550px;
            border: 2px solid red;
            margin: 50px auto;
        }
        .box div{
            position: absolute;
            left: 100px;
            top: 100px;
            width: 200px;
            height: 200px;
            border-radius: 10px;
            background-color: deepskyblue;
            
        }
        body{
            width: 100%;
            height: 100%;
        }
    </style>
</head>

<body>
    <div class="box">
        <div></div>
    </div>
</body>

<script src="move.js"></script>
<script>
    const box = document.querySelectorAll('box')[0]

    new Move({
        box:box
    })

    
</script>

</html>